<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateNdTPartsTable extends Migration
{
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		// Create the `Parts` table
		Schema::create('nd_t_parts', function(Blueprint $table)
		{
            $table->increments('id');
            $table->date('purchase_date');
            $table->integer('car_auction_id');
            $table->string('parts_name', 40);
            $table->string('seller', 40);
            $table->string('seller_send_type', 40);
            $table->date('recieve_date');
            $table->string('pickup_car_chassis_number', 40);
            $table->integer('payment_type');
            $table->integer('payment_commission');
            $table->date('payment_date');
            $table->integer('price');
            $table->integer('delivery_fee');
            $table->integer('commission');
            $table->integer('customer_id');
            $table->integer('fee_mongol');
            $table->string('comment', 1000);
            $table->integer('cancel_flag')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Delete the `Parts` table
        Schema::drop('nd_t_parts');
    }
}
